<template>
	<view>
		<rich-text :nodes="userAgreementStr" v-if="userAgreementStr != ''"></rich-text>
	</view>
</template>

<script>
	import {
		getAgreement
	} from "@/apis/user.js"
	export default {
		data() {
			return {
				userAgreementStr: '',
			};
		},
		onLoad() {
			this.getUserAgreement();
		},
		methods: {
			async getUserAgreement() {
				let res = await getAgreement()
				if (res.code === 200) {
					this.userAgreementStr = "<div class='ql-editor'>"+res.data.content + "</div>";
				}
			}
		}
	}
</script>
<style lang="less">

</style>